﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AntEditor.Models.Material;

namespace AntEditor.Models
{
    public class MaterialService
    {
        public List<Account> GetAccounts()
        {
            return new List<Account>()
                {
                    new Account()
                        {
                            Id = 10000,
                            Name = "AntTest0"
                        },
                    new Account()
                        {
                            Id = 10001,
                            Name = "AntTest1"
                        }
                };
        }

        public void LoadAccountMaterials(Account account)
        {
            account.Campaigns = GenerateTestCampaigns(10);
        }

        private List<Campaign> GenerateTestCampaigns(int count)
        {
            List<Campaign> campaigns = new List<Campaign>();

            for (int i = 0; i < count; i++)
            {
                var campaign = new Campaign()
                    {
                        Id = i,
                        Name = "CampaignName"
                    };
                campaigns.Add(campaign);
            }

            return campaigns;
        }
    }
}
